package com.wctj.api.base.enums;

/**
 * @author: lzg
 * @description: alipay 支付宝 App 支付, wx_lite 微信小程序支付
 */
public enum PayChannelEnums {
    ADAPAY_ALIPAY("alipay", "支付宝App支付",PayPlatformEnums.HUIFU_ADAPAY),
    ADAPAY_ALIPAY_LITE("alipay_lite", "支付宝小程序支付",PayPlatformEnums.HUIFU_ADAPAY),
    ADAPAY_WX_LITE("wx_lite", "微信小程序支付",PayPlatformEnums.HUIFU_ADAPAY),
    ADAPAY_WX_PUB("wx_pub", "微信公众号支付",PayPlatformEnums.HUIFU_ADAPAY),
    ADAPAY_CMBPAY("CMBPAY", "招行支付",PayPlatformEnums.CMB_PAY),
//    // 暂未对接，先临时取个 code
//    wx_pub_dougong("wx_pub", "微信公众号支付",PayPlatformEnums.huifu_dougong),
//    wx_lite_dougong("wx_lite", "微信小程序支付",PayPlatformEnums.huifu_dougong),

    ;

    private String code;
    private String msg;
    private PayPlatformEnums type;

    PayChannelEnums(String code, String message, PayPlatformEnums type) {
        this.code = code;
        this.msg = message;
        this.type = type;
    }


    public static PayChannelEnums of(String code) {
        for (PayChannelEnums apiCode : PayChannelEnums.values()) {
            if (apiCode.getCode().equals(code)) {
                return apiCode;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public PayPlatformEnums getType() {
        return type;
    }
}

